<form action="keyword.manage.php" id="form_add" name="form_add" method="post">
	<input type="hidden" name="action" value="show_save" />
    <table class="from_table">
		<tr>
			<th class="th2"><tpl> $langKeywordTransferCode </tpl>：</th>
			<td width="530" class="td1"><input name="txt_code" type="text" id="txt_code" class="txtinput" size="30" />
		  <label style="display:none" for="txt_code" class="wrong" metaDone="true" generated="true"></label>			</td>
		</tr>
		<tr>
			<th class="th2"><tpl> $langKeywordSel </tpl><br />
		    <tpl> $langKeywordEveryFormat </tpl></th>
			<td width="530" class="td1"><textarea name="txt_content" id="txt_content" style="width:400px" cols="50" rows="5" class="tarea"></textarea><br />
<tpl> $langKeywordEveryLinkAdd </tpl></td>
		</tr>
		
  </table>
  <div class="table-5-bottom"> <div class="p-left-2"><span class="btn_left">
		  <input type="submit" name="Submit" value="<tpl> $langKeywordSubmit </tpl>" class="btn_submit"/></span>	</div></div>
</form>
<script>
$(document).ready(function() {

	//添加
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ShowDiv	= 'mainshow';
								getPageContent("keyword.manage.php?action=show");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form_add").validate({
		errorClass: "wrong",
		rules: {
			txt_code: {required:true},
			txt_content: {required:true}
		},
		messages: {
			txt_code: {required:"<tpl> $langKeywordTransferCodeNotNull </tpl>"},
			txt_content: {required:"<tpl> $langKeywordContentNotNull </tpl>"}
		},
		submitHandler: function() {
			$('#form_add').ajaxSubmit(options);
		}
	});
});
</script>